#! /usr/bin/make

CXXFLAGS=-O2 -g -Wall

prefix = $(DESTDIR)/usr/local
INSTALL=/usr/bin/install
TMP=/tmp
PACKAGENAME=damped_oscillator
EXENAME=$(PACKAGENAME)

exec_prefix = $(prefix)
datarootdir = $(prefix)/share
datadir = $(datarootdir)
bindir = $(exec_prefix)/bin
docdir = $(datarootdir)/doc/$(PACKAGENAME)
mandir = $(datarootdir)/man
localstatedir = $(prefix)/var
gamesdir = $(localstatedir)/games

SDL_CONFIG=sdl-config
NEWD=$(PACKAGENAME)-$(VERSION)
COMPILEDATE=$(shell date '+%Y-%m-%d')
TARPKGNAME=$(NEWD).pkg.tgz
OPTIONS=`$(SDL_CONFIG) --cflags`
LIBRARIES=-lSDL -lSDL_image -lSDL_mixer

all:	$(EXENAME)

$(EXENAME):	intro.cc
	$(CXX) $(CXXFLAGS) -o $(EXENAME) $(OPTIONS) $+ $(LIBRARIES)

clean:
	rm -f *.o *.d $(EXENAME) TAGS


tags:
	etags *.c *.h >TAGS

.PHONY: all clean install uninstall dist pkg tags

